// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 新增系统应用 POST /sysapp/add */
export async function insertAppUsingPost(body: API.SysAppVO, options?: { [key: string]: any }) {
  return request<API.TradeResult>('/sysapp/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除系统应用 POST /sysapp/delete */
export async function deleteAppsUsingPost(body: string[], options?: { [key: string]: any }) {
  return request<API.TradeResult>('/sysapp/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询系统应用列表 POST /sysapp/list */
export async function fetchAppListUsingPost(
  body: API.PageBeanAppListQuery_,
  options?: { [key: string]: any },
) {
  return request<API.TradeResult>('/sysapp/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改系统应用 POST /sysapp/update */
export async function updateAppUsingPost(body: API.SysAppVO, options?: { [key: string]: any }) {
  return request<API.TradeResult>('/sysapp/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
